package com.wh.hotel.enums.strategy;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 定价策略类型
 *
 * @author wenhao
 */

@Getter
@AllArgsConstructor
public enum PriceStrategyTypeEnum {

    BASE_PRICE(0,"基准价策略"),
    ;

    private final int code;
    private final String desc;

    public static PriceStrategyTypeEnum parse(Integer code) {
        if (code == null) {
            return null;
        }
        for (PriceStrategyTypeEnum priceStrategyTypeEnum : PriceStrategyTypeEnum.values()) {
            if (priceStrategyTypeEnum.getCode() == code) {
                return priceStrategyTypeEnum;
            }
        }
        return null;
    }
}
